import javax.swing.*;
import java.awt.*;

public class Frame extends JFrame{
    Container container = this.getContentPane();
    Frame(int width, int height){
        container.setLayout(new FlowLayout(FlowLayout.CENTER,100,25));
        this.setSize(width,height);
        this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        this.setTitle("BpmTools");
        this.setVisible(true);
    }
    Label addLabel(String text,int size){
        Label label = new Label(text,size);
        container.add(label);
        return label;
    }
    Label addLabel(int x,int y){
        Label label = new Label(x,y);
        container.add(label);
        return label;
    }
    class  Label extends JLabel{

        Label(String text,int size){
            this.setFont(new Font("宋体",Font.PLAIN,size));
            this.setText(text);
            this.setVisible(true);
        }
        Label(int x,int y){
            this.setBounds(x,y,0,0);
            this.setVisible(true);
        }
    }
}

